package com.cloud.ribbon.configuration;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 2020/3/17
 * RestTemplate配置
 *
 * @author machuanpeng
 */
@Configuration
public class RestTemplateConfiguration {

    /**
     * 注入RestTemplate客户端执行HTTP请求.
     * 2020/3/18
     *
     * @param
     * @return org.springframework.web.client.RestTemplate
     * @author machuanpeng
     */
    @Bean
    @LoadBalanced
    RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
